﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using XCore.Domain.Entities;

namespace SaaS.Model.Entity.Auths
{
    /// <summary>
    /// 菜单表
    /// </summary>
    [Table("Auth_Menus")]
    public class Menu : IEntity<int>
    {
        public int Id { get; set; }
        /// <summary>
        /// 上级菜单Id
        /// </summary>
        public int? ParentId { get; set; }
        public int? TenantId { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        [StringLength(32)]
        public string Title { get; set; }
        /// <summary>
        /// 页面路径
        /// </summary>
        [StringLength(32)]
        public string Path { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [Required]
        [StringLength(32)]
        public string Name { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        [StringLength(32)]
        public string Icon { get; set; }
        /// <summary>
        /// 是否可见
        /// </summary>
        public bool IsVisble { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public short Sort { get; set; }

        /// <summary>
        /// 组件（vue需引用）
        /// </summary>
        [StringLength(128)]
        public string Component { get; set; }
        /// <summary>
        /// 重定向
        /// </summary>
        [StringLength(64)]
        public string Redirect { get; set; }
        /// <summary>
        /// 始终显示根目录   
        /// </summary>
        public bool AlwaysShow { get; set; }


        public int? CreatorUserId { get; set; }
        public DateTime CreationTime { get; set; }
        public int? LastModifyUserId { get; set; }
        public DateTime? LastModifyDate { get; set; }
    }
}
